Add native macOS (universal x86_64+arm64) build support#10
Open
regniws wants to merge 1 commit into
Open
Conversation
The embedded server already runs on macOS; only the native components lacked a macOS build. This adds: - native_components/*/build_macos.sh — builds each component as a universal (x86_64 + arm64) .dylib, verifies the 4 required 1C Native API exports, and ad-hoc signs it. - .github/workflows/build-macos.yml — produces universal dylib artifacts on a macOS runner, so macOS binaries can be shipped without owning a Mac (same model as the Linux .so flow). - native_components/BUILDING_MACOS.md + README pointer. Documents the two non-obvious pitfalls found while porting: - the 1C:Enterprise macOS client is an x86_64 binary (Rosetta 2 on Apple Silicon), so arm64-only libraries fail with "Тип не определен (AddIn.*.*)" — hence universal builds; - an .epf re-saved by a Designer newer than the runtime fails to open with "ошибка формата потока" — build it with the oldest platform in use. ScreenCapture is intentionally excluded (Windows GDI, no non-Windows path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что это
Встроенный сервер уже работает на macOS — не хватало только сборки нативных компонент под mac. Этот PR добавляет macOS как полноценную цель сборки, не требуя физического Mac у мейнтейнера (бинарники собирает CI на macOS-раннере, ровно как Linux
.so).Изменения
native_components/*/build_macos.sh— собирает каждую компоненту как universal (x86_64 + arm64).dylib, проверяет 4 обязательных экспорта 1C Native API и ad-hoc подписывает..github/workflows/build-macos.yml— на раннереmacos-14собираетMCPHttpTransport,QueryLineageAnalyzer,RegexHelper,SyntaxHelpReader,ToonConverterи публикует.dylibартефактами.native_components/BUILDING_MACOS.md+ ссылка из README.Два неочевидных грабля (задокументированы)
Тип не определен (AddIn.*.*). Поэтому сборка universal..epfнельзя пересохранять Конфигуратором новее рантайма →ошибка формата потокапри открытии. Собирать самой старой используемой версией платформы.Заметки
ScreenCaptureисключён намеренно — Windows GDI, нет не-Windows ветки. На macOS его макет остаётся Win-DLL,get_screenshotнедоступен (одно предупреждение при старте), остальной функционал работает.tests/smoke_test.cpp), чтобы не зависеть от отсутствующего файла.